package com.example.pojo.entitly;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName drug_storage
 */
public class DrugStorage implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 药品id
     */
    private Integer drugId;

    /**
     * 管理员才可以入库药品
     */
    private Integer drugadminId;

    /**
     * 时间
     */
    private Date created;

    /**
     * 数量
     */
    private Integer drugData;

    /**
     * 价格
     */
    private Double price;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 药品id
     */
    public Integer getDrugId() {
        return drugId;
    }

    /**
     * 药品id
     */
    public void setDrugId(Integer drugId) {
        this.drugId = drugId;
    }

    /**
     * 管理员才可以入库药品
     */
    public Integer getDrugadminId() {
        return drugadminId;
    }

    /**
     * 管理员才可以入库药品
     */
    public void setDrugadminId(Integer drugadminId) {
        this.drugadminId = drugadminId;
    }

    /**
     * 时间
     */
    public Date getCreated() {
        return created;
    }

    /**
     * 时间
     */
    public void setCreated(Date created) {
        this.created = created;
    }

    /**
     * 数量
     */
    public Integer getDrugData() {
        return drugData;
    }

    /**
     * 数量
     */
    public void setDrugData(Integer drugData) {
        this.drugData = drugData;
    }

    /**
     * 价格
     */
    public Double getPrice() {
        return price;
    }

    /**
     * 价格
     */
    public void setPrice(Double price) {
        this.price = price;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DrugStorage other = (DrugStorage) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getDrugId() == null ? other.getDrugId() == null : this.getDrugId().equals(other.getDrugId()))
            && (this.getDrugadminId() == null ? other.getDrugadminId() == null : this.getDrugadminId().equals(other.getDrugadminId()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
            && (this.getDrugData() == null ? other.getDrugData() == null : this.getDrugData().equals(other.getDrugData()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getDrugId() == null) ? 0 : getDrugId().hashCode());
        result = prime * result + ((getDrugadminId() == null) ? 0 : getDrugadminId().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getDrugData() == null) ? 0 : getDrugData().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", drugId=").append(drugId);
        sb.append(", drugadminId=").append(drugadminId);
        sb.append(", created=").append(created);
        sb.append(", drugData=").append(drugData);
        sb.append(", price=").append(price);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}